{% extends "zato/index.html" %}

{% block html_title %}KVDB remote commands{% endblock %}

{% block "extra_css" %}
    <style type="text/css">
        #command-list a {
            font-size:10px;
            color:#333;
            text-decoration:none
        }
    </style>
{% endblock %}

{% block "extra_js" %}
    {% comment %} Common JS {% endcomment %}
    <script nonce="{{ CSP_NONCE }}" type="text/javascript" src="/static/js/common.js"></script>
    <script nonce="{{ CSP_NONCE }}" type="text/javascript" src="/static/jquery/jquery.form.js"></script>
    <script nonce="{{ CSP_NONCE }}" type="text/javascript" src="/static/jquery/jquery.cookie.js"></script>
    <script nonce="{{ CSP_NONCE }}" type="text/javascript" src="/static/js/outgoing/redis/remote-command.js"></script>
{% endblock %}

{% block "content" %}
<h2 class="zato">Key/value DB : Remote commands</h2>


{% if not zato_clusters %}
    {% include "zato/no-clusters.html" %}
{% else %}

    <div id="user-message-div" style='display:none'><pre id="user-message" class="user-message"></pre></div>

{% include "zato/search-form.html" with page_prompt="Show commands"%}

    {% if cluster_id %}
        <div id="markup">
            <form novalidate action="./execute/?cluster_id={{ cluster.id }}" method="post" id="command-form">
            {% csrf_token %}
                <table id="data-table">
                    <tr>
                        <td class='inline_header'>
                        <span class="form_hint" id="command-list">
                            Commands available:
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('CONFIG GET')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('CONFIG GET')">CONFIG GET,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('CONFIG SET')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('CONFIG SET')">CONFIG SET,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('CONFIG RESETSTAT')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('CONFIG RESETSTAT')">CONFIG RESETSTAT,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('DBSIZE')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('DBSIZE')">DBSIZE</a>,
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('DECR')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('DECR')">DECR,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('DECRBY')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('DECRBY')">DECRBY,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('DEL')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('DEL')">DEL,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('DUMP')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('DUMP')">DUMP,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('ECHO')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('ECHO')">ECHO,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('EXISTS')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('EXISTS')">EXISTS,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('EXPIRE')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('EXPIRE')">EXPIRE,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('EXPIREAT')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('EXPIREAT')">EXPIREAT,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('FLUSHDB')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('FLUSHDB')">FLUSHDB,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('GET')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('GET')">GET,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('HDEL')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('HDEL')">HDEL,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('HEXISTS')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('HEXISTS')">HEXISTS,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('HGET')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('HGET')">HGET,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('HGETALL')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('HGETALL')">HGETALL,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('HINCRBY')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('HINCRBY')">HINCRBY,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('HKEYS')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('HKEYS')">HKEYS,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('HLEN')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('HLEN')">HLEN,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('HSET')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('HSET')">HSET,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('HSETNX')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('HSETNX')">HSETNX,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('HVALS')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('HVALS')">HVALS,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('INCR')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('INCR')">INCR,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('INCRBY')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('INCRBY')">INCRBY,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('INFO')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('INFO')">INFO,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('KEYS')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('KEYS')">KEYS,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('LLEN')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('LLEN')">LLEN,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('LPOP')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('LPOP')">LPOP,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('LPUSH')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('LPUSH')">LPUSH,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('LPUSHX')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('LPUSHX')">LPUSHX,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('LRANGE')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('LRANGE')">LRANGE,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('LREM')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('LREM')">LREM,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('LSET')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('LSET')">LSET,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('LTRIM')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('LTRIM')">LTRIM,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('MGET')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('MGET')">MGET,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('MSET')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('MSET')">MSET,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('MSETNX')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('MSETNX')">MSETNX,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('OBJECT')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('OBJECT')">OBJECT,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('PERSIST')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('PERSIST')">PERSIST,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('PEXPIRE')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('PEXPIRE')">PEXPIRE,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('PEXPIREAT')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('PEXPIREAT')">PEXPIREAT,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('PING')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('PING')">PING,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('PSETEX')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('PSETEX')">PSETEX,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('PTTL')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('PTTL')">PTTL,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('RANDOMKEY')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('RANDOMKEY')">RANDOMKEY,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('RENAME')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('RENAME')">RENAME,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('RENAMENX')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('RENAMENX')">RENAMENX,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('RESTORE')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('RESTORE')">RESTORE,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('RPOP')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('RPOP')">RPOP,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('SADD')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('SADD')">SADD,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('SET')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('SET')">SET,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('SISMEMBER')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('SISMEMBER')">SISMEMBER,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('SMEMBERS')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('SMEMBERS')">SMEMBERS,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('SREM')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('SREM')">SREM,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('TIME')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('TIME')">TIME,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('TTL')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('TTL')">TTL,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('TYPE')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('TYPE')">TYPE,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('ZADD')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('ZADD')">ZADD,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('ZRANGE')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('ZRANGE')">ZRANGE,</a>
    <a href="javascript:$.fn.zato.outgoing.redis.command_template('ZREM')" onmouseover="javascript:$.fn.zato.outgoing.redis.command_help('ZREM')">ZREM</a>
                        </span>
                            {{ form.command }}
                            <input type="hidden" name="cluster_id" value="{{ cluster.id }}" />
                        </td>
                    </tr>
                    <tr>
                        <td class='inline_header'>
                            <div style="float:left;color:#333">
                                <span id="command-help" style="text-align:left"><br/><br/></span>
                            </div>
                            <div style="text-align:right">
                                <input type="submit" value="Execute" />
                            </div>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            {{ form.result }}
                        </td>
                    </tr>

                </table>
            </form>
        </div>
    {% endif %}

{% endif %}


{% endblock %}
